home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 212 / 212.d81 / sliding blocks (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  189 lines

  1. 5 poke56576,6:poke53272,222:poke648,116:poke53265,27:poke56,116:poke55,0
  2. 6 s9=54272:fori=s9tos9+24:pokei,0:next
  3. 7 bb$="[155]             sliding blocks[157][157][157][157][157][157][157][157][157][157][157][157][157][157][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  4. 8 sz$="[145]                                      [145]"
  5. 10 poke53280,0:poke53281,0:print"[147]":printbb$
  6. 30 poke53269,0:poke30712,248:poke53287,1
  7. 40 dimpc(6,7,5),dn(5,6,5)
  8. 50 forx=1to4:readbk$(x):next
  9. 60 data"[207][183][183][208][157][157][157][157][180][160][160][170][157][157][157][157][204][175][175][186]","[207][183][183][183][183][183][183][208][157][157][157][157][157][157][157][157][180][160][160][160][160][160][160][170][157][157][157][157][157][157][157][157][204][175][175][175][175][175][175][186]"
  10. 70 data"[207][183][183][208][157][157][157][157][180][160][160][170][157][157][157][157][180][160][160][170][157][157][157][157][180][160][160][170][157][157][157][157][180][160][160][170][157][157][157][157][204][175][175][186]"
  11. 80 data"[207][183][183][183][183][183][183][208][157][157][157][157][157][157][157][157][180][160][160][160][160][160][160][170][157][157][157][157][157][157][157][157][180][160][160][160][160][160][160][170][157][157][157][157][157][157][157][157][180][160][160][160][160][160][160][170][157][157][157][157][157][157][157][157]"
  12. 90 bk$(4)=bk$(4)+"[180][160][160][160][160][160][160][170][157][157][157][157][157][157][157][157][204][175][175][175][175][175][175][186]"
  13. 100 forgm=1to5:fory=2to6:forx=2to5:readpc(x,y,gm):next:next:next
  14. 110 data4,-1,2,-1, -4,-5,2,-1, 1,,,1, 3,3,2,-1, -4,-4,2,-1
  15. 120 data0,4,-1,, 3,-4,-5,3, -4,1,1,-4, 3,1,1,3, -4,2,-1,-4
  16. 130 data3,,,3, -4,4,-1,-4, 3,-4,-5,3, -4,2,-1,-4, 1,1,1,1
  17. 140 data1,4,-1,1, 3,-4,-5,3, -4,3,,-4, 1,-4,,1, 2,-1,2,-1
  18. 150 data1,4,-1,1, 3,-4,-5,3, -4,3,,-4, 1,-4,,1, 2,-1,2,-1
  19. 160 forgm=1to5:fory=2to6:forx=2to5:readdn(x,y,gm):next:next:next
  20. 170 data0,,,,,,,,,,,,,,4,,,,,0
  21. 180 data3,3,3,3,,,,,,2,,,1,4,,1,1,,,1
  22. 190 data0,,,,,,,,,,,,,4,,,,,,0
  23. 200 data0,,,,,,,,,,,,,4,,,,,,0
  24. 210 data2,,2,,1,,3,1,3,,,3,,4,,,1,,,1
  25. 220 forx=1to5:readdn$(x):next
  26. 230 data"[172][163][157][157][165] "
  27. 240 data"[172][172][172][172][157][157][157][157][165][165][165][165][157][157][157][146][172][163][157][157][157][146][172][172][163][146][172][157][157][157][157][172][165] [146][172]"
  28. 250 data"[172][163][157][157][165] "
  29. 260 data"[172][163][157][157][165] "
  30. 270 data"[172][163][146][172][163][146][157][157][157][157][172] [172][172][157][157][157][157][172] [165][146][172][157][157][157][157][165][146][172][163][165][146][157][157][157][157][172][165] [146][172]"
  31. 280 forx=1to5:readmv(x),bg(x):next
  32. 290 data 39,49152, 107,49232, 162,49448, 147,49774, 258,50070
  33. 300 forx=1to5:readgm$(x):next
  34. 310 datadad's puzzler,pioneer 1,the donkey,the century,century and a half
  35. 320 printbb$:print"[155]":forx=1to5:printtab(9)""x"[154] "gm$(x):print:next
  36. 325 poke53269,0
  37. 330 printtab(10)"[155](i[155])nstructions"
  38. 340 printtab(10)"(s[155])olutions"
  39. 345 printtab(10)"(q[155])uit to loadstar"
  40. 350 print"        [159](c) 1990 by brian boese":poke198,0
  41. 360 geta$:ifa$<>"q"anda$<>"i"anda$<>"s"and(a$<"1"ora$>"5")then360
  42. 370 ifa$="i"thengosub1140:print"[147]":goto320
  43. 380 ifa$<>"q"then430
  44. 390 poke214,19:print:print"       [156]quit - are you sure? (y[156]/n[156])":poke198,0
  45. 400 geta$:ifa$<>"y"anda$<>"n"then400
  46. 410 ifa$="n"thenprintsz$:goto320
  47. 420 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15:printer
  48. 422 ifer<>63thenpoke56576,151:poke648,4:poke53272,21:poke53269,0:print"[147]":end
  49. 424 print"[147][144]load"chr$(34)"hello connect"chr$(34)",8"
  50. 426 print"run"
  51. 428 poke631,13:poke632,13:poke198,2:end
  52. 430 ifa$<>"s"then640
  53. 440 poke214,17:print:print"       [156]solution for which? (1[156]-5[156])":poke198,0
  54. 450 geta$:ifa$<>"q"and(a$<"1"ora$>"5")then450
  55. 460 ifa$="q"thenprintsz$:goto320
  56. 470 gosub1450:ps=bg(gm)
  57. 480 geta$:ifa$<>"q"then530
  58. 490 poke214,21:print:print"       [156]quit - are you sure? (y[156]/n[156])"
  59. 500 geta$:ifa$<>"y"anda$<>"n"then500
  60. 510 ifa$="y"thenrun
  61. 530 fm=peek(ps):dr=peek(ps+1):ps=ps+2:iffm+dr=0then610
  62. 540 y=int(fm/4+2):x=fm-(y-2)*4+2:pc=pc(x,y,gm)
  63. 550 gosub1350
  64. 560 ifdr=0theny=y-1
  65. 570 ifdr=1thenx=x+1
  66. 580 ifdr=2theny=y+1
  67. 590 ifdr=3thenx=x-1
  68. 600 gosub1400:forq=1to200:next:goto480
  69. 610 poke214,21:print:print"       [158]press any key to continue"
  70. 620 gosub1280
  71. 630 run
  72. 640 gosub1450
  73. 650 poke53248,11+32*x:poke53249,49+24*y:poke53269,1
  74. 655 poke214,21:print:print"        [156]press q[156] to quit to menu"
  75. 660 gosub1280
  76. 670 ifa$<>"q"then720
  77. 680 poke214,21:print:print"       [156]quit - are you sure? (y[156]/n[156])":poke198,0
  78. 690 geta$:ifa$<>"y"anda$<>"n"then690
  79. 700 ifa$="y"thenrun
  80. 710 printsz$:goto655
  81. 720 ifa$=""theny=y-(y<6)
  82. 730 ifa$="[145]"theny=y+(y>2)
  83. 740 ifa$="[157]"thenx=x+(x>2)
  84. 750 ifa$=""thenx=x-(x<5)
  85. 760 ifa$<>chr$(13)orpc(x,y,gm)=0then650
  86. 770 gosub50770:dx=0:dy=0:ifpc(x,y,gm)>0then800
  87. 780 ifpc(x,y,gm)<>-4thenx=x-1:dx=1
  88. 790 ifpc(x,y,gm)<-1theny=y-1:dy=1
  89. 800 pc=pc(x,y,gm):gosub1130:print"[154][146]"bk$(pc)
  90. 810 gosub1280:ifa$=chr$(13)thengosub50770:goto1060
  91. 820 ifa$<>""then890
  92. 830 ifx=5then1060
  93. 840 if(pc=1)and(pc(x+1,y,gm)<>0)then1060
  94. 850 if(pc=2orpc=4)and(pc(x+2,y,gm)<>0orx=4)then1060
  95. 860 if(pc=3)and(pc(x+1,y,gm)<>0orpc(x+1,y+1,gm)<>0)then1060
  96. 870 if(pc=4)and(pc(x+2,y+1,gm)<>0orx=4)then1060
  97. 880 gosub1350:x=x-(x<5):goto1070
  98. 890 ifa$<>"[157]"then940
  99. 900 ifx=2then1060
  100. 910 ifpc(x-1,y,gm)<>0then1060
  101. 920 if(pc=3orpc=4)and(pc(x-1,y+1,gm)<>0)then1060
  102. 930 gosub1350:x=x+(x>2):goto1070
  103. 940 ifa$<>""then1010
  104. 950 ify=6then1060
  105. 960 if(pc=1orpc=2)and(pc(x,y+1,gm)<>0)then1060
  106. 970 if(pc=2)and(pc(x+1,y+1,gm)<>0)then1060
  107. 980 if(pc=3orpc=4)and(pc(x,y+2,gm)<>0ory=5)then1060
  108. 990 if(pc=4)and(pc(x+1,y+2,gm)<>0)then1060
  109. 1000 gosub1350:y=y-(y<6):goto1070
  110. 1010 ifa$<>"[145]"then1060
  111. 1020 ify=2then1060
  112. 1030 ifpc(x,y-1,gm)<>0then1060
  113. 1040 if(pc=2orpc=4)and(pc(x+1,y-1,gm)<>0)then1060
  114. 1050 gosub1350:y=y+(y>2):goto1070
  115. 1060 mv=mv-1
  116. 1070 gosub1400
  117. 1080 wn=-1:forv=2to6:forh=2to5:ifdn(h,v,gm)=0then1100
  118. 1090 ifdn(h,v,gm)<>pc(h,v,gm)thenwn=0:v=7:h=6
  119. 1100 next:next:ifnotwnthen650
  120. 1110 poke214,20:print:printtab(13)"[158]you got it!!!":gosub50670
  121. 1120 print"       press any key to continue":gosub1280:run
  122. 1130 print"":fora=2tox:print"";:next:fora=2toy:print"";:next:return
  123. 1140 print"[147]"tab(14)"[155]instructions":printtab(14)"[163][163][163][163][163][163][163][163][163][163][163][163]"
  124. 1150 print"[154]   try to position the pieces indicated"
  125. 1160 print"at the side into the correct positions,"
  126. 1170 print"shown in the small box at the side. note";
  127. 1180 print"that in some of the puzzles, not all"
  128. 1190 print"pieces have to be in a specific"
  129. 1200 print"position."
  130. 1210 print"   move the pointer using either the"
  131. 1220 print"cursor keys or a joystick in port 2."
  132. 1230 print"select a piece by pressing and releasing";
  133. 1240 print"the fire button or return key."
  134. 1250 print"  press 'q' at any time to end the game"
  135. 1260 print"[158]press any key to continue"
  136. 1270 gosub1280:return
  137. 1280 poke198,0
  138. 1285 geta$:js=peek(56320)and31:ifa$=""andjs=31then1285
  139. 1290 if(jsand1)=0thena$="[145]"
  140. 1300 if(jsand2)=0thena$=""
  141. 1310 if(jsand4)=0thena$="[157]"
  142. 1320 if(jsand8)=0thena$=""
  143. 1330 if(jsand16)=0thena$=chr$(13):wait56320,16,239
  144. 1331 forq=1to100:next
  145. 1340 return
  146. 1350 pc(x,y,gm)=0
  147. 1360 if(pc=2orpc=4)thenpc(x+1,y,gm)=0
  148. 1370 if(pc=3orpc=4)thenpc(x,y+1,gm)=0
  149. 1380 if(pc=4)thenpc(x+1,y+1,gm)=0
  150. 1390 gosub1130:print"[144]"bk$(pc):return
  151. 1400 gosub1130:print"[154]"bk$(pc):pc(x,y,gm)=pc
  152. 1410 if(pc=2orpc=4)thenpc(x+1,y,gm)=-1
  153. 1420 if(pc=3orpc=4)thenpc(x,y+1,gm)=-4
  154. 1430 if(pc=4)thenpc(x+1,y+1,gm)=-5
  155. 1440 x=x+dx:y=y+dy:mv=mv+1:print"[157][157][157][157][157][157][159]"mv:return
  156. 1450 gm=val(a$):print"[147][155]"gm$(gm)
  157. 1460 print""tab(25)"[159]solution:"mv(gm):printtab(25)"moves:    0[145][145][145][145]"
  158. 1470 print"[158][213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
  159. 1480 forx=1to15:print"[194]                [194]":next
  160. 1490 print"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][20